$(function () {
    //展示商品分类
    $.ajax({
        type:"post",
        url:"category?method=findAllCategory",
        dataType:"json",
        success:function (data) {
            var li="";
            //[{},{},{}]
            $.each(data,function (i,e) {
                li+="<li><a href='product?method=findProductByCid&&cid="+e.cid+"'>"+e.cname+"</a></li>"
            });
            $("#myCategory").html(li);
        }
    })
})